package cn.v2tila.rsosa.student.service.serviceImpl;

import cn.v2tila.rsosa.student.entity.MessageEntity;
import cn.v2tila.rsosa.student.jpa.MessageJPA;
import cn.v2tila.rsosa.student.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author v2tila on 2:50 2019/4/6
 */
@Service
public class MessageServiceImpl implements MessageService {
    @Autowired
    private MessageJPA messageJPA;

    @Override
    public MessageEntity saveAndFlush(MessageEntity messageEntity) {
        return messageJPA.saveAndFlush(messageEntity);
    }

    @Override
    public List<MessageEntity> findByUniqueIdAndContactUniqueId(String uniqueId, String contactUniqueId) {
        return messageJPA.findByUniqueIdAndContactUniqueId(uniqueId, contactUniqueId);
    }
}
